var descriptor = {
  address: {
    type: "object", required: true,
    fields: {
      street: {type: "string", required: true, display: '街道' },
      city: {type: "string", required: true, display: '城市'},
      zip: {type: "string", required: true, len: 8, message: "invalid zip"}
    }
  },
  name: {type: "string", required: true, message: '名字'},
  pattern: { pattern: /^[1,8][0-9]{10,11}$/, display: '正则' },
  phone: [
    { required: true, display: '电话号码' },
    { max: 5, display: '号码' }
  ]
}
var validator = new AsyncValidator(descriptor);
validator.validate({ address: { zip: '12' }, phone: '123455', pattern: '123' }, (errors, fields) => {
  console.log(errors, fields)
});
